class UsersController < ApplicationController
  skip_before_filter :login_required

  # render new.rhtml
  def new
  end

 def create
    @user = User.new(params[:user])
    @user.save!
    self.current_user = @user
    respond_to do |format| 
      format.html do 
        redirect_back_or_default('/') 
        flash[:notice] = "Thanks for signing up!" 
      end 
      format.xml  { render :xml => @user.to_xml } 
    end 
  rescue ActiveRecord::RecordInvalid 
    respond_to do |format| 
      format.html { render :action => 'new' } 
      format.xml do 
        if !@user.errors.empty? 
          render :xml => @user.errors.to_xml_full 
        else 
          render :text => "error" 
        end 
      end 
    end
  end
end
